/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package x10.queues;

import java.util.LinkedList;

import x10.event.X10Event;

/**
 *
 * @author Denny
 */
public class X10EventQueue {

    private LinkedList<X10Event> eventQueue = new LinkedList<X10Event>();

    public X10EventQueue(){
    }

    public X10Event pop(){
        return (X10Event)eventQueue.remove();
    }

    public void add(X10Event event){
        eventQueue.add(event);
    }

    public void clear(){
        eventQueue.clear();
    }

    public int count(){
        return eventQueue.size();
    }

    public boolean hasNext(){
        return !eventQueue.isEmpty();
    }
}
